﻿' 
' Copyright (C) 2014 Infinity CCS Ltd (http://www.infinityccs.com/)
' Copyright (C) 2008 Sasa Coh <sasacoh@gmail.com>
'
' This program is free software; you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation; either version 3 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program.  If not, see <http://www.gnu.org/licenses/>. 
'/


Imports System
Imports Infinity.pjsipNET.Common.Media
Imports Infinity.pjsipNET.Common.Config

Namespace Common.CallState
#Region "Null Pattern"
  Friend Class NullStateMachine
    Inherits IStateMachine

    Public Sub New()
      MyBase.New()
    End Sub

    Public Overrides ReadOnly Property StateId As EStateId
      Get
        Return EStateId.NULL
      End Get
    End Property

    Public Overrides Property CallingName As String
      Get
        Return ""
      End Get
      Set(value As String)

      End Set
    End Property

    Public Overrides Property CallingNumber As String
      Get
        Return ""
      End Get
      Set(value As String)

      End Set
    End Property

    Public Overrides Property DDI As String
      Get
        Return ""
      End Get
      Set(value As String)

      End Set
    End Property

    Public Overrides Property Incoming As Boolean
      Get
        Return False
      End Get
      Set(value As Boolean)

      End Set
    End Property

    Public Overrides Property Is3Pty As Boolean
      Get
        Return False
      End Get
      Set(value As Boolean)

      End Set
    End Property

    Public Overrides Property IsHeld As Boolean
      Get
        Return False
      End Get
      Set(value As Boolean)

      End Set
    End Property

    Public Overrides Property SessionId As Integer
      Get
        Return -1
      End Get
      Set(value As Integer)

      End Set
    End Property

    Public Overrides Property AccountId As Integer
      Get
        Return -1
      End Get
      Set(value As Integer)

      End Set
    End Property

    Public Overrides Property Line As Integer
      Get
        Return 0
      End Get
      Set(value As Integer)

      End Set
    End Property

    Friend Overrides ReadOnly Property State As IState
      Get
        Return New IState.NullState
      End Get
    End Property


    Friend Overrides Sub ChangeState(stateId As EStateId)

    End Sub

    Public Overrides Sub Destroy()

    End Sub

    Public Overrides ReadOnly Property IsNull As Boolean
      Get
        Return True
      End Get
    End Property

    Friend Overrides Property RetrieveRequested As Boolean
      Get
        Return False
      End Get
      Set(value As Boolean)

      End Set
    End Property

    Friend Overrides Property HoldRequested As Boolean
      Get
        Return False
      End Get
      Set(value As Boolean)

      End Set
    End Property

    Friend Overrides ReadOnly Property CallProxy As ICallProxy
      Get
        Return New ICallProxy.NullCallProxy
      End Get
    End Property

    Friend Overrides ReadOnly Property Config As IConfigurator
      Get
        Return New NullConfigurator
      End Get
    End Property
    Friend Overrides ReadOnly Property MediaProxy As IMediaProxy
      Get
        Return New NullMediaProxy
      End Get
    End Property

    Friend Overrides Property Type As CallLog.ECallType
      Get
        Return CallLog.ECallType.EDialed
      End Get
      Set(value As CallLog.ECallType)

      End Set
    End Property

    Friend Overrides Function StartTimer(ttype As Timer.ETimerType, numDelay As Integer) As Boolean
      Return False
    End Function

    Friend Overrides Function StopTimer(ttype As Timer.ETimerType) As Boolean
      Return False
    End Function

    Friend Overrides Sub StopAllTimers()

    End Sub

    Friend Overrides Property Time As DateTime
      Get
        Return New DateTime
      End Get
      Set(value As DateTime)

      End Set
    End Property

    Public Overrides Property Duration As TimeSpan
      Get
        Return New TimeSpan
      End Get
      Set(value As TimeSpan)

      End Set
    End Property

    Public Overrides ReadOnly Property RuntimeDuration As TimeSpan
      Get
        Return New TimeSpan()
      End Get
    End Property

    Friend Overrides Sub ActivatePendingAction()

    End Sub

    Friend Overrides Property Counting As Boolean
      Get
        Return False
      End Get
      Set(value As Boolean)

      End Set
    End Property

    Public Overrides ReadOnly Property Codec As String
      Get
        Return "PCMA"
      End Get
    End Property

    Friend Overrides Property DisableStateNotifications As Boolean
      Get
        Return True
      End Get
      Set(value As Boolean)

      End Set
    End Property

    Friend Overrides ReadOnly Property NumberOfCalls As Integer
      Get
        Return 0
      End Get
    End Property

    Public Overrides Property LastStatus As Integer
      Get
        Return 0
      End Get
      Set(value As Integer)

      End Set
    End Property

    Public Overrides Property LastStatusText As String
      Get
        Return ""
      End Get
      Set(value As String)

      End Set
    End Property
  End Class
#End Region

End Namespace
